<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Login</title>
        <h:outputStylesheet library="css" name="default.css"/>
        <h:outputStylesheet library="css" name="estilos.css"/>
    </h:head>
    <h:body>
        <h:form id="formLogin">
            <p:growl id="mensaje"/>
            <p:panel id="panel" header="Ingreso">
                <h:panelGrid id="campos" columns="2">
                    <p:outputLabel id="lblUsuario" value="Usuario" for="usuario"/>
                    <p:inputText id="usuario" value="${loginBean.usuario}"/>

                    <p:outputLabel id="lblClave" value="Clave" for="clave"/>
                    <p:password id="clave" value="${loginBean.clave}"/>
                    
                    <h:panelGroup/>
                    <h:panelGrid columns="2">
                        <p:commandButton id="btnIngresar" value="Ingresar" action="${loginBean.ingresar()}" ajax="false"/>
                        <h:link value="Registrarse" outcome="Registrar"/>
                    </h:panelGrid>
                </h:panelGrid>
            </p:panel>
        </h:form>
    </h:body>   
</html>